﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style TargetType="{x:Type TabItem}" x:Key="Normal_Style_TabItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Cursor="Hand">
                        <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" CornerRadius="3,3,3,3" Background="{TemplateBinding Background}">
                            <ContentControl Content="{TemplateBinding TabItem.Header}"/>
                        </Border>
                        <Border Name="Bd_Back" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" CornerRadius="3,3,3,3" Background="#FFFCFCFC" Opacity="0" BorderThickness="1,1,1,1"/>
                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseEnter">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Bd_Back" Storyboard.TargetProperty="Opacity" To="0.2"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                            <EventTrigger RoutedEvent="Mouse.MouseLeave">
                                <BeginStoryboard>
                                    <Storyboard>
                                        <DoubleAnimation Duration="0:0:0.2" Storyboard.TargetName="Bd_Back" Storyboard.TargetProperty="Opacity"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger>
                        </Grid.Triggers>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TabItem.IsSelected" Value="True">
                            <Setter Property="Opacity" Value="0.2" TargetName="Bd_Back"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>